package org.example.springmvc;

import org.example.springmvc.controller.StudentController;
import org.example.springmvc.service.Service;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringMvcApplication {

    public static void main(String[] args) {
        //获取spring上下文
        ApplicationContext context = SpringApplication.run(SpringMvcApplication.class, args);
        //从spring中获取对象
//        StudentController studentController = context.getBean("studentController",StudentController.class);
//        //使用spring对象
//        studentController.run();
    }

}
